from appium import webdriver
from . import constants


def base_driver():
    desired_caps = {
        "platformName": constants.PLATFORMNAME,
        "platformVersion": constants.PLATFORMVERSION,
        "deviceName": constants.DEVICENAME,
        "appPackage": constants.APPPACKAGE,
        "appActivity": constants.APPACTIVITY,
        "unicodeKeyboard": True,
        "resetKeyboard": True
    }
    driver = webdriver.Remote("http://127.0.0.1:4723/wd/hub", desired_capabilities=desired_caps)
    driver.implicitly_wait(3)
    return driver
